#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time     : 2025/4/24 19:15
# @Author   : MingTai
# @File     : image_convert.py

from PIL import Image


def image_convert():
    # 打开一个彩色图像
    image = Image.open("./extracted_frames/image1.jpg")

    # 转换为黑白图像
    bw_image = image.convert("L")

    # 保存或显示黑白图像
    bw_image.save("path_to_save_bw_image.jpg")
    bw_image.show()


# 图片搞成黑白色
if __name__ == '__main__':
    image_convert()
